package cn.powertime.evaluation.mapper;

import cn.powertime.evaluation.entity.CpsUserCollect;
import cn.powertime.evaluation.vo.RespAnswerTopicListVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户收藏试卷表 Mapper 接口
 * </p>
 *
 * @author liqi
 * @since 2019-09-23
 */
public interface CpsUserCollectMapper extends BaseMapper<CpsUserCollect> {

    /**
     * 用户收藏习题列表查询语句
     *
     * @param page   分页参数
     * @param userId 用户id
     * @return Page
     */
    Page<RespAnswerTopicListVo> selectPage(Page page, @Param("userId") Long userId);

    /**
     * 取消关注删除语句
     *
     * @param userId  用户id
     * @param topicId 习题id
     * @return
     */
    Integer batchDel(@Param("userId") Long userId, @Param("topicId") Long topicId);

}
